package com.jiantong.work.enums;

/**
 * Created by niufei on 2017/3/23.
 *
 */
public enum ButcherReportStatus {

    REJECT(-2,"驳回"),
    HAS_DESTRUCTION(-1,"已处理"),
    UNCOMMITTED(0,"未提交"),
    STAY_APPROVE(1,"待受理"),
    ANTEMORTEM_INSPECTION(2,"宰前检查"),
    SYNCHRONOUS_INSPECTION(3,"同步检疫"),
    STAY_LICENSE(4,"合格发证"),
    HAS_LICENSE(5,"已发证");

    private final Integer value;
    private final String description;

    ButcherReportStatus(Integer value, String description) {
        this.value = value;
        this.description = description;
    }

    public static ButcherReportStatus from(Integer value) {
        for (ButcherReportStatus butcherReportStatus : ButcherReportStatus.values()) {
            if (butcherReportStatus.value == value) {
                return butcherReportStatus;
            }
        }
        return null;
    }

    public Integer value() {
        return this.value;
    }

    @Override
    public String toString() {
        return description;
    }
}
